<%@ Control Language="C#" AutoEventWireup="true" Codebehind="ucEmpBasic.ascx.cs"
    Inherits="BaseSystem._System.UserControl.ucEmpBasic" %>
<%@ Register Assembly="Auto.Web.Common" Namespace="Auto.Web.Common" TagPrefix="cc2" %>
<%@ Register Src="ucDateTextBox.ascx" TagName="ucDateTextBox" TagPrefix="uc2" %>
<%@ Import Namespace="Auto.Data.HumanResource" %>
<%@ Register Src="ucDivision.ascx" TagName="ucDivision" TagPrefix="uc1" %>
<%@ Register Assembly="Auto.WebControls" Namespace="Auto.WebControls" TagPrefix="cc1" %>
<table align="left" style="width: 326px; border: solid 1px  #4682b4;">
    <tr>
        <td class="table_body">
            <%=Resources.Base.EmpID %>
        </td>
        <td class="table_none">
            <asp:TextBox ID="txtEmpID" runat="server" CssClass="textcommon"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmpID"
                Display="dynamic" ErrorMessage="Emp ID could not be blank" SetFocusOnError="True"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                    ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmpID"
                    Display="dynamic" ErrorMessage="Emp ID length must between 1 and 20" SetFocusOnError="True"
                    ValidationExpression=".{1,20}"></asp:RegularExpressionValidator></td>
        <td class="table_body">
            <%=Resources.Base.PersonID%>
        </td>
        <td class="table_none" nowrap="nowrap">
            <asp:TextBox ID="txtPersonID" runat="server" CssClass="textcommon"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td class="table_body">
            <%=Resources.Base.EmpName %>
        </td>
        <td class="table_none">
            <asp:TextBox ID="txtName" runat="server" CssClass="textcommon"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtName"
                ErrorMessage="Emp Name could not be blank" Display="dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtName"
                ErrorMessage="Emp Name length must between 1 and 20" ValidationExpression=".{1,50}"
                Display="dynamic" SetFocusOnError="True"></asp:RegularExpressionValidator>&nbsp;</td>
        <td class="table_body" nowrap="nowrap">
            <%=Resources.Base.DivID%>
        </td>
        <td class="table_none" nowrap="nowrap">
            <uc1:ucDivision ID="UcDivision1" runat="server" />
        </td>
    </tr>
    <tr>
        <td class="table_body">
            &nbsp;<%=Resources.Base.Email%></td>
        <td class="table_none">
            <asp:TextBox ID="txtEmail" runat="server" CssClass="textcommon"></asp:TextBox></td>
        <td class="table_body" nowrap="nowrap">
            <%=Resources.Base.LevelNO%>
        </td>
        <td class="table_none" nowrap="nowrap">
            <asp:TextBox ID="txtLevelNO" runat="server" CssClass="textcommon"></asp:TextBox></td>
    </tr>
    <tr>
        <td class="table_body">
            &nbsp;<%=Resources.Base.CardNO%>
        </td>
        <td class="table_none">
            <asp:TextBox ID="txtCardNO" runat="server" CssClass="textcommon"></asp:TextBox></td>
        <td class="table_body" nowrap="nowrap">
            <%=Resources.Base.BirthDay%>
        </td>
        <td class="table_none" nowrap="nowrap">
            <uc2:ucDateTextBox ID="UcDateTextBox1" runat="server" />
        </td>
    </tr>
    <tr>
        <td class="table_body">
            <%=Resources.Base.Sex%>
        </td>
        <td class="table_none">
            <asp:DropDownList ID="ddlSex" runat="server">
                <asp:ListItem Value="true" Text="<%$ Resources:Base,Male%>"></asp:ListItem>
                <asp:ListItem Value="false" Text="<%$ Resources:Base,Female%>"></asp:ListItem>
            </asp:DropDownList></td>
        <td class="table_body" nowrap="nowrap">
            &nbsp;<%=Resources.Base.Married%></td>
        <td class="table_none" nowrap="nowrap">
            <asp:DropDownList ID="ddlMarried" runat="server">
                <asp:ListItem Value="true" Text="<%$ Resources:Base,Married%>"></asp:ListItem>
                <asp:ListItem Value="false" Text="<%$ Resources:Base,Unmarried%>"></asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td class="table_body">
            <%=Resources.Base.OfficePhone%>
        </td>
        <td class="table_none">
            <asp:TextBox ID="txtOfficePhoneExt" runat="server" CssClass="textcommon"></asp:TextBox></td>
        <td class="table_body" nowrap="nowrap">
            <%=Resources.Base.Note%>
        </td>
        <td class="table_none" nowrap="nowrap">
            <asp:TextBox ID="txtNote" runat="server" CssClass="textcommon"></asp:TextBox></td>
    </tr>
    <tr>
        <td class="table_none" colspan="4" style="text-align: center">
            <%--<asp:Button ID="btnAdd" runat="server" CssClass="button_bak" OnClick="btnAdd_Click"
                Text="<%$ Resources:Base,Add %>" />
            <asp:Button ID="btnUpdate" runat="server" CssClass="button_bak" OnClick="btnUpdate_Click"
                Text="<%$ Resources:Base,Modify %>" />
            <asp:Button ID="btnDelete" runat="server" CausesValidation="false" CssClass="button_bak"
                OnClick="btnDelete_Click" OnClientClick="return confirm('are you sure to delete?');"
                Text="<%$ Resources:Base,Delete %>" />--%>
            <cc2:OButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="<%$ Resources:Base,Add %>" ButtonType="OP_ADD" />
            <cc2:OButton ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="<%$ Resources:Base,Modify %>" ButtonType="OP_EDIT" />
            <cc2:OButton ID="btnDelete" runat="server" OnClick="btnDelete_Click" OnClientClick="return confirm('are you sure to delete?');"
                Text="<%$ Resources:Base,Delete %>" CausesValidation="false" ButtonType="OP_DELETE" /></td>
    </tr>
    <tr>
        <td colspan="4">
            <cc1:GridViewEx ID="GridViewEx1" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                Width="560px" PageSize="20" OnRowCommand="GridViewEx1_RowCommand" CssClass="GridViewStyle">
                <FooterStyle CssClass="GridViewFooterStyle" />
                <Columns>
                    <asp:TemplateField HeaderText="<%$ Resources:Base,EmpID %>" SortExpression="EmpID">
                        <itemtemplate>
                        <asp:Label Id="lblGVEmpID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, EmpBasic.FIELD_EmpID).ToString()%>' />
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Base,DivID %>" SortExpression="DivID">
                        <itemtemplate>
                            <%# DataBinder.Eval(Container.DataItem, EmpBasic.FIELD_DivID).ToString()%>
                        </itemtemplate>
                    </asp:TemplateField>
                    <%--                    <asp:TemplateField HeaderText="<%$ Resources:Base,DivName %>" SortExpression="DivName">
                        <itemtemplate>
                           <%# DataBinder.Eval(Container.DataItem, Division.FIELD_DivName).ToString()%>                              
                        </itemtemplate>
                    </asp:TemplateField>--%>
                    <asp:TemplateField HeaderText="<%$ Resources:Base,EmpName %>" SortExpression="Name">
                        <itemtemplate>
                           <%# DataBinder.Eval(Container.DataItem, EmpBasic.FIELD_Name).ToString()%>
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Base,Email %>" SortExpression="Email">
                        <itemtemplate>
                             <%# DataBinder.Eval(Container.DataItem, EmpBasic.FIELD_Email).ToString()%>                           
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="<%$ Resources:Base,CardNO %>" SortExpression="CardNO">
                        <itemtemplate>
                              <%# DataBinder.Eval(Container.DataItem, EmpBasic.FIELD_CardNO).ToString()%>                      
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Selected">
                        <itemtemplate>
                             <asp:LinkButton ID="lnkSelected" Text="Selected" CausesValidation="False" runat="server" CommandArgument="<%# Container.DisplayIndex %>" CommandName="Selected"></asp:LinkButton>       
                             <asp:LinkButton ID="lnkAdd" Text="Add" CausesValidation="False" runat="server" CommandName="Add"></asp:LinkButton>       
                        </itemtemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle CssClass="GridViewRowStyle" />
                <EditRowStyle CssClass="GridViewEditRowStyle" />
                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                <PagerStyle CssClass="GridViewPagerStyle" />
                <HeaderStyle CssClass="GridViewHeaderStyle" />
                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                <LockHeaderSetting Height="800px" Support="False" Width="" />
                <CustomPage CustomSupport="False" DisplayType="DropDownList" Position="Top" SelfMotion="True">
                </CustomPage>
                <ResizeHeader Support="False" />
                <TrimLongStrSetting MaxLength="100" Support="False" />
                <AutoSortSetting AutoSort="True" SortTip="" />
                <CustomColumns>
                    <RadioButtonColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                    <NumberColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                    <MultiChooseColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                </CustomColumns>
                <ExportSetting ExportExcel="False" ExportFileName="exportedgv" ExportPdf="False"
                    ExportWord="False" Sepeater="&amp;nbsp;||&amp;nbsp;" ShowCopyRight="True" Visible="False">
                </ExportSetting>
                <MouseBehavior MouseOverColor="#d8e7b0" Support="False" />
            </cc1:GridViewEx>
        </td>
    </tr>
</table>
